import request from '@/utils/request'

export function addRecord(data) {
  return request({
    url: '/juanbusiness/base-config/add',
    method: 'post',
    data
  })
}

export function findRecord(page,size) {
  return request({
    url: '/juanbusiness/base-config/findPage',
    method: 'get',
    params: {page: page,size: size}
  })
}

 export function categoryRecord(category) {
    return request({
      url: '/juanbusiness/base-config/category',
      method: 'get',
      params: { category: category}
    })
  }

  export function codeRecord(code) {
    return request({
      url: '/juanbusiness/base-config/code',
      method: 'get',
      params: {code: code}
    })
  }

  export function detailRecord(id) {
    return request({
      url: '/juanbusiness/base-config/get',
      method: 'get',
      params: {id: id}
    })
  }

export function editRecord(data) {
  return request({
    url: '/juanbusiness/base-config/edit',
    method: 'put',
    data
  })
}

export function enableRecord(id) {
  return request({
    url: '/juanbusiness/base-config/enable',
    method: 'put',
    params: {
      id: id
    }
  })
}

export function delRecord(id) {
  return request({
    url: '/juanbusiness/base-config/del',
    method: 'delete',
    params: {id: id}
  })
}
